﻿namespace DBUtil.SqlSegment;

public abstract class OtherSqlSegment(DBAccess db)
{
    public DBAccess db { get; } = db;

    /// <summary>
    /// 示例:
    /// <list type="bullet">
    /// <item>sqlserver: IfNullSeg("t.[Age]",'0') => isnull(t.[Age],0)</item>
    /// <item>mysql: IfNullSeg("t.`Age`",'0') => ifnull(t.`Age`,0)</item>
    /// </list>
    /// </summary>
    /// <returns></returns>
    public abstract string IfNullSeg(string inputSeg, string whenNullSeg);
}
